package gui;

import java.awt.Canvas;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.BorderFactory;
import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.LayoutStyle;
import javax.swing.SwingConstants;
import javax.swing.border.BevelBorder;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class PrimeiroMenu extends javax.swing.JPanel {

	/** Creates new form PrimeiroMenu */
	public PrimeiroMenu() {
		initComponents();
	}

	@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		GroupLayout layout = new GroupLayout((JComponent) this);
		this.setLayout(layout);

		{
			painelInferior = new JPanel();
			painelInferior.setBackground(new java.awt.Color(204, 204, 255));
			painelInferior.setBorder(BorderFactory
					.createEtchedBorder(BevelBorder.LOWERED));
			painelInferior.setLayout(null);
			{
				jLabel1 = new javax.swing.JLabel();
				painelInferior.add(jLabel1);
				jLabel1.setFont(new java.awt.Font("Tahoma", 0, 48)); // NOI18N
				jLabel1.setText("                 Menu Principal");
				jLabel1.setForeground(new java.awt.Color(0, 102, 102));
				jLabel1.setBounds(2, 2, 796, 90);
				jLabel1.setBorder(BorderFactory
						.createEtchedBorder(BevelBorder.LOWERED));
			}
			{
				jPanel1 = new JPanel();
				painelInferior.add(jPanel1);
				jPanel1.setBounds(37, 111, 719, 365);
				jPanel1.setBackground(new java.awt.Color(204, 204, 255));
				jPanel1.setBorder(BorderFactory
						.createEtchedBorder(BevelBorder.LOWERED));
				jPanel1.setLayout(null);
				{
					cadastra = new javax.swing.JButton();
					jPanel1.add(cadastra);
					cadastra.setLayout(null);
					cadastra.setText("Cadastrar Dados");
					cadastra.setBorder(BorderFactory
							.createEtchedBorder(BevelBorder.LOWERED));
					cadastra.setBounds(263, 73, 231, 39);
					cadastra.setFont(new java.awt.Font("Arial", 2, 18));
					cadastra.setForeground(new java.awt.Color(0, 0, 0));
					cadastra.setBackground(new java.awt.Color(255, 255, 255));
					cadastra.addMouseListener(new java.awt.event.MouseAdapter() {
						public void mouseClicked(java.awt.event.MouseEvent evt) {
							cadastraMouseClicked(evt);
						}
					});
				}
				{
					jButton1 = new JButton();
					jPanel1.add(jButton1);
					jButton1.setText("Sair");
					jButton1.setBorder(BorderFactory
							.createEtchedBorder(BevelBorder.LOWERED));
					jButton1.setBounds(263, 242, 231, 39);
					jButton1.setLayout(null);
					jButton1.setFont(new java.awt.Font("Arial", 2, 18));
					jButton1.setForeground(new java.awt.Color(0, 0, 0));
					jButton1.setBackground(new java.awt.Color(255, 255, 255));
					jButton1.addMouseListener(new MouseAdapter() {
						public void mouseClicked(MouseEvent evt) {
							jButton1MouseClicked(evt);
						}
					});
				}
				{
					altera = new javax.swing.JButton();
					jPanel1.add(altera);
					altera.setText("Visualizar/Alterar Dados");
					altera.setBorder(BorderFactory
							.createEtchedBorder(BevelBorder.LOWERED));
					altera.setBounds(263, 154, 231, 39);
					altera.setFont(new java.awt.Font("Arial", 2, 18));
					altera.setForeground(new java.awt.Color(0, 0, 0));
					altera.setBackground(new java.awt.Color(255, 255, 255));
					altera.addMouseListener(new java.awt.event.MouseAdapter() {
						public void mouseClicked(java.awt.event.MouseEvent evt) {
							alteraMouseClicked(evt);
						}
					});
				}
			}
		}
		{
			painelSuperior = new JPanel();
			painelSuperior.setBackground(new java.awt.Color(204, 204, 255));
			painelSuperior.setBorder(BorderFactory
					.createEtchedBorder(BevelBorder.LOWERED));
			{
				nomeDoProjeto = new JLabel();
				painelSuperior.add(nomeDoProjeto);
				nomeDoProjeto.setText("Gerenciador De Escolas");
				nomeDoProjeto.setFont(new java.awt.Font("Tahoma", 1, 48));
				nomeDoProjeto.setForeground(new java.awt.Color(0, 102, 102));
			}
		}
		layout.setVerticalGroup(layout
				.createSequentialGroup()
				.addComponent(painelSuperior, GroupLayout.PREFERRED_SIZE, 85,
						GroupLayout.PREFERRED_SIZE)
				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
				.addComponent(painelInferior, 0, 509, Short.MAX_VALUE));
		layout.setHorizontalGroup(layout
				.createParallelGroup()
				.addComponent(painelInferior, GroupLayout.Alignment.LEADING, 0,
						800, Short.MAX_VALUE)
				.addComponent(painelSuperior, GroupLayout.Alignment.LEADING,
						GroupLayout.PREFERRED_SIZE, 800,
						GroupLayout.PREFERRED_SIZE));

		this.setBackground(new java.awt.Color(192, 192, 192));
		this.setPreferredSize(new java.awt.Dimension(800, 600));
		this.setSize(800, 600);
	}// </editor-fold>

	private void cadastraMouseClicked(java.awt.event.MouseEvent evt) {

		GerenciadorDeJanelas.window
				.setContentPane(GerenciadorDeJanelas.menuCadastra);
		GerenciadorDeJanelas.window.setVisible(true);
	}

	private void alteraMouseClicked(java.awt.event.MouseEvent evt) {
		GerenciadorDeJanelas.window
				.setContentPane(GerenciadorDeJanelas.menuAltera);
		GerenciadorDeJanelas.window.setVisible(true);
	}

	private void visualizarMouseClicked(java.awt.event.MouseEvent evt) {
		GerenciadorDeJanelas.window
				.setContentPane(GerenciadorDeJanelas.menuVisualiza);
		GerenciadorDeJanelas.window.setVisible(true);
	}

	private void jButton1MouseClicked(MouseEvent evt) {
		System.exit(0);

	}

	// Variables declaration - do not modify
	private javax.swing.JButton altera;
	private javax.swing.JButton cadastra;
	private JPanel painelSuperior;
	private JPanel painelInferior;
	private JLabel nomeDoProjeto;
	private JButton jButton1;
	private JPanel jPanel1;
	private javax.swing.JLabel jLabel1;
	// End of variables declaration

}
